package com.wardrobe.dao.banner;

import com.wardrobe.domain.banner.BannerBean;
import com.wardrobe.domain.banner.BannerShowBean;
import com.wardrobe.domain.common.BackEndFromBean;
import com.wardrobe.mapper.master.banner.BannerMasterMapper;
import com.wardrobe.mapper.slave.banner.BannerSlaveMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/11/15.
 */
@Service
public class BannerDao {
    @Autowired
    private BannerMasterMapper bannerMasterMapper;
    @Autowired
    private BannerSlaveMapper bannerSlaveMapper;

    public int insertBanner(BannerBean bannerBean){
        return bannerMasterMapper.insertBanner(bannerBean);
    }

    public int updateBanner(BackEndFromBean fromBean){
        return bannerMasterMapper.updateBanner(fromBean);
    }

    public int deleteBanner(int id){
       return bannerMasterMapper.deleteBanner(id);
    }
    public List<BannerShowBean> selectBannerList(int status,int type){
        return bannerSlaveMapper.selectBannerList(status,type);
    }
}
